1. Field of the Invention
The present invention relates to a method for mapping source colors of an image to destination colors reproducible by a printing apparatus, the source colors and destination colors having a lightness component, the method comprising the steps of defining one of the source colors as a source black point, defining one of the source colors as a source white point, defining a source lightness line comprising the source black point and the source white point, defining one of the destination colors as a destination black point, defining one of the destination colors as a destination white point, defining a destination lightness line comprising the destination black point and the destination white point, defining a transformation from the source colors to the destination colors, the transformation mapping the source white point onto the destination white point and the source black point onto the destination black point, and applying the defined transformation to the source colors.
2. Background of the Invention
A digital image consists of pixels, which are defined as points in a color space, e.g. an RGB color space, an XYZ color space or an L*a*b* color space. In an RGB color space, each pixel is defined by three coordinates, which represent the red, green and blue color component of the pixel respectively. In an L*a*b* color space, each pixel is defined by three coordinates, which represent the lightness of the pixel, its position between red/magenta and green and its position between yellow and blue, respectively. Each coordinate represents a property of each point in the color space.
The source colors of the image may be defined as a part of the color space, which contains only those points of the color space that are also part of the representation of the colors of the digital image in the color space. The collection of source colors is often referred to as the image gamut. The destination colors reproducible by a printing apparatus may be defined as the part of the color space that contains all of the colors that can be printed by the printing apparatus. The collection of destination colors is often referred to as the printer gamut. In practice, the printer gamut is often smaller in size than the image gamut. This means that a point of the image gamut may not be a point in the printer gamut and cannot be printed according to the coordinates of that point. Normally, points of the image gamut are mapped on the points of the printer gamut in a particular way. After such a mapping, the printing apparatus is able to print the mapped image.
It is recommended to implement a mapping from an image to a printable image, as described above, in such a way that at least one property of the points in the image is maintained as far as possible. For example, one wants to maintain a perceived lightness of the image or local details of the image. An algorithm for mapping images may be used in many of the currently available color management software, which may be implemented in a controller of a printing apparatus. Often, such an algorithm contains a mapping of a color space towards the same color space, which is decomposed into a scaling step in the directions of the three coordinate axes of the color space and an offset step. Such a mapping scales the complete image gamut in three directions and normally takes into account the possible ranges of the coordinates in the printer gamut. Such a mapping may take into account a deviating axis of a property of the printer gamut, e.g. a lightness axis. This results in a so-called black and white point correction algorithm. A printer displays color images in its unique way. A printer may be calibrated using look-up tables (LUTs) or with an ICC style color management, which relies on color profiles to ensure that images are reproduced and displayed accurately. Part of creating a LUT may be a black and white point correction.
A black and white point correction is an operation that matches perceived black of the image to the darkest printer lightness and perceived white of the image to the brightest printer lightness. It is critical for a pleasing reproduction of images. Black and white point correction may be automatically included in a gamut mapping algorithm or it may be performed as a pre- or post-processing step, in addition to a gamut mapping.
The following method, also called a scaling-and-offset algorithm, is used in many of the currently available color management software. The International Color Consortium ICC recommends inclusion of this simple method into a perceptual rendering intent. There are slight differences between implementations; nevertheless, the common basic structure may be summarized as follows. The algorithm performs a transformation in a color space, for example an XYZ color space which maps source black and white points onto destination black and white points, respectively:XYZsrc-blackXYZdest-black  (1)XYZsrc-whiteXYZdest-white  (2)
The transformation is defined by a scaling matrix and an offset vector and has six free parameters. The transformation is described in a formula:
                              (                                                                      X                  ′                                                                                                      Y                  ′                                                                                                      Z                  ′                                                              )                =                                            (                                                                    Sx                                                        0                                                        0                                                                                        0                                                        Sy                                                        0                                                                                        0                                                        0                                                        Sz                                                              )                        ⁢                          (                                                                    X                                                                                        Y                                                                                        Z                                                              )                                +                      (                                                            Ox                                                                              Oy                                                                              Oz                                                      )                                              (        3        )            
After calculating the three free parameters sX, sY, sZ of the scaling matrix and the three free parameters oX, oY, oZ of the offset vector, all colors of the image undergo this simple affine transformation. An example of a flow diagram of this transformation is given in FIG. 3a and will be described further on. Although the algorithm is widely used, its application has serious disadvantages:                In case of a printing apparatus as a destination device, the parameters sX, sY, sZ on the diagonal of the scaling matrix get values around 0.8. Consequently, the linear scaling can be seen as compression by approximately 20% in all three XYZ directions.        The transformation compresses in all three XYZ directions. Consequently, it compresses the color distance between each color pair. In other words, this algorithm leads to a loss in both local and global contrast of approximately 15% measured in CIEΔE units, which units are defined by the International Commission on Illumination (CIE), which introduced a number of distance metrics ΔE. For example ΔE*ab is defined as follows: using (L*1,a*1,b*1) and (L*2,a*2,b*2), two colors in a L*a*b* color space,ΔE*ab=√{square root over ((L*2−L*1)2+(a*2−a*1)2+(b*2−b*1)2)}{square root over ((L*2−L*1)2+(a*2−a*1)2+(b*2−b*1)2)}{square root over ((L*2−L*1)2+(a*2−a*1)2+(b*2−b*1)2)}        Finally, unlike many gamut mapping algorithms, this method changes all colors, even those lying inside the printer gamut. Hence, every color pair or complete images fitting into the gamut undergo this compression.        